﻿@namespace AntDesign.Internal
@inherits AntDomComponentBase

@{
    string inlineFlexDisplay = InlineFlexMode ? "display: inline-flex;" : "";
}

<div class="@ClassMapper.Class"
     style="@inlineFlexDisplay @Style"
     id="@Id"
     @ref="@Ref"
     @onclick="OnClickDiv"
     @onmouseenter="OnTriggerMouseEnter"
     @onmouseleave="OnTriggerMouseLeave"
     @oncontextmenu="OnTriggerContextmenu"
     @onfocusin="OnTriggerFocusIn"
     @onfocusout="OnTriggerFocusOut"
     @oncontextmenu:preventDefault>
    @ChildContent
</div>

<CascadingValue Value="this" Name="Trigger">
    <Overlay @ref="_overlay"
             HiddenMode="HiddenMode"
             OnShow="OnOverlayShow"
             OnHide="OnOverlayHide"
             OnOverlayMouseEnter="OnOverlayMouseEnter"
             OnOverlayMouseLeave="OnOverlayMouseLeave" />
</CascadingValue>